﻿<%@ Page Language="C#" CodeBehind="MyBikes.aspx.cs" Inherits="BikeBouncer.Site.MyBikes_aspx" MasterPageFile="/MainLayout.master" %>
<%@ Register TagPrefix="BB" TagName="AddNote" Src="/AddNote.ascx" %>
<asp:Content ContentPlaceHolderID="MainContents" runat="server">
	<div class="MyBikesTopBar">
		<asp:HyperLink NavigateUrl="/Register.aspx" CssClass="LinkMyBikesAdd" meta:resourcekey="LinkMyBikesAdd" runat="server" />
		<asp:DropDownList ID="CboBikes" CssClass="FormSelect" DataValueField="Id" DataTextField="Summary" onchange="MyBikes_ComboChanged(this)" meta:resourcekey="CboBikes" runat="server" />
	</div>
	<asp:Panel ID="PanDashboard" runat="server">
		<p>
			<asp:Literal ID="LitBikesRegistered" meta:resourcekey="LitBikesRegistered" runat="server" />
		</p>
	</asp:Panel>
	<asp:Panel ID="PanBikeSaved" CssClass="PanelOk Ok" runat="server">
		<asp:Label ID="LblBikeSaved" runat="server" />!
	</asp:Panel>
	<asp:Panel ID="PanBikeDetails" CssClass="MyBikeDetails" runat="server">
		<div class="Panel">
			<h3><asp:Literal meta:resourcekey="LitItemStatus" runat="server" /></h3>
			<p>
				<asp:Image ID="ImgItemStatus" CssClass="ImgMyBikeStatus" meta:resourcekey="ImgItemStatus" runat="server" />
				<asp:Label ID="LblItemStatusValue" runat="server" />
				<asp:HyperLink ID="LinkUpdateStatus" NavigateUrl="#" Font-Bold="true" meta:resourcekey="LinkUpdateStatus" runat="server" />
			</p>
			<p>
				<asp:HyperLink ID="LinkTrackItem" meta:resourcekey="LinkTrackItem" runat="server" />
			</p>
		</div>
		<asp:Panel ID="PanNotes" CssClass="Panel MyBikesNote" runat="server">
			<h3><asp:Literal meta:resourcekey="LitNotes" runat="server" /></h3>
			<div class="MyBikesNotes">
				<asp:UpdatePanel RenderMode="Inline" UpdateMode="Conditional" runat="server">
					<Triggers>
						<asp:AsyncPostBackTrigger ControlID="LinkNoteNewer" EventName="Click" />
						<asp:AsyncPostBackTrigger ControlID="LinkNoteOlder" EventName="Click" />
					</Triggers>
					<ContentTemplate>
						<div style="float:right">
							<asp:LinkButton ID="LinkNoteNewer" OnClick="LinkNoteNewer_Click" meta:Resourcekey="LinkNoteNewer" runat="server" />
							<asp:Literal ID="LitNoteCurrent" runat="server" />
							<asp:LinkButton ID="LinkNoteOlder" OnClick="LinkNoteOlder_Click" meta:Resourcekey="LinkNoteOlder" runat="server" />
						</div>
						<div>
							<strong><asp:Literal ID="LitNotePostedDate" runat="server" /></strong>
						</div>
						<p>
							<asp:Literal ID="LitNoteDetails" runat="server" />
						</p>
						<div>
							<asp:Literal ID="LitNoteAddress" runat="server" />
						</div>
						<div>
							<asp:Label ID="LblNoteOwner" Font-Italic="true" runat="server" />
						</div>
					</ContentTemplate>
				</asp:UpdatePanel>
			</div>
		</asp:Panel>
		<div class="Panel">
			<h3><asp:Literal meta:resourcekey="LitPanelForm" runat="server" /></h3>
			<div class="PanelForm">
				<p>
					<asp:Label ID="LblItemRegDate" meta:resourcekey="LblItemRegDate" runat="server" />.
				</p>
				<asp:Label AssociatedControlID="TxtItemTitle" meta:resourcekey="LblItemTitle" runat="server" />
				<asp:TextBox ID="TxtItemTitle" CssClass="FormText" Width="220px" ValidationGroup="Details" meta:resourcekey="TxtItemTitle" runat="server" />
				<asp:RequiredFieldValidator ID="ReqTxtItemTitle" ControlToValidate="TxtItemTitle" Display="Dynamic" Text="*" ValidationGroup="Details" meta:resourcekey="ReqTxtItemTitle" runat="server" />
				<br />
				<asp:Label AssociatedControlID="TxtItemMaker" meta:resourcekey="LblItemMaker" runat="server" />
				<asp:TextBox ID="TxtItemMaker" CssClass="FormText" Width="220px" autocomplete="off" meta:resourcekey="TxtItemMaker" ValidationGroup="Details" runat="server" />
				<asp:RequiredFieldValidator ID="ReqTxtItemMaker" ControlToValidate="TxtItemMaker" Display="Dynamic" Text="*" ValidationGroup="Details" meta:resourcekey="ReqTxtItemMaker" runat="server" />
				<br />
				<asp:Label AssociatedControlID="TxtItemSerial" meta:resourcekey="LblItemSerial" runat="server" />
				<asp:TextBox ID="TxtItemSerial" CssClass="FormText" Width="220px" meta:resourcekey="TxtItemSerial" ValidationGroup="Details" runat="server" />
				<asp:RequiredFieldValidator ID="ReqTxtItemSerial" ControlToValidate="TxtItemSerial" Display="Dynamic" Text="*" ValidationGroup="Details" meta:resourcekey="ReqTxtItemSerial" runat="server" />
				<br />
				<asp:Label AssociatedControlID="TxtItemDetails" meta:resourcekey="LblItemDetails" runat="server" />
				<asp:TextBox ID="TxtItemDetails" CssClass="FormArea" Width="310px" Height="140px" TextMode="MultiLine" ValidationGroup="Details" runat="server" />
				<br /><br />
				<asp:Label AssociatedControlID="LinkBikePicture" style="float:left" meta:resourcekey="LblItemPicture" runat="server" />
				<div class="ViewBikePictureFrame">
					<asp:HyperLink ID="LinkBikePicture" runat="server"><asp:Image ID="ImgBikePicture" meta:resourcekey="ImgBikePicture" runat="server" /></asp:HyperLink>
					<br />
					<asp:AsyncFileUpload ID="UplBikePicture" meta:resourcekey="UplBikePicture" runat="server"
										 ThrobberID="ImgPictureUploading"
										 Width="200px"
										 OnClientUploadStarted="MyBikes_PictureUploadStarted"
										 OnClientUploadComplete="MyBikes_PictureUploadComplete"
										 OnUploadedComplete="UplBikePicture_UploadedComplete" />
					<br />
					<asp:Image ID="ImgPictureUploading" ImageUrl="/Images/LoadingAnim.gif" Width="208" Height="13" style="display:none" runat="server" />
				</div>
			</div>
		</div>
		<div class="PanelButtons">
			<asp:ValidationSummary CssClass="ValSummary" DisplayMode="List" ShowSummary="true" ValidationGroup="Details" HeaderText="<%$ Resources:Messages,ValidationSummary %>" runat="server" />
			<asp:Button ID="ButUpdateDetails" CssClass="FormButton" ValidationGroup="Details" OnClick="ButUpdateDetails_Click" meta:resourcekey="ButUpdateDetails" runat="server" />
		</div>
		<div class="Panel">
			<h3><asp:Literal meta:resourcekey="LitBarcodes" runat="server" /></h3>
			<div class="PanelForm">
				<p>
					<asp:Literal meta:resourcekey="LitItemKey" runat="server" />
					<strong><asp:Label ID="LblItemKeyValue" runat="server" /></strong>.
				</p>
				<p>
					<asp:Literal meta:resourcekey="LitPrintBarcode" runat="server" />
				</p>
				<div class="Barcodes">
					<asp:Image ID="ImgQRCode" CssClass="MyBikesBarcode" meta:resourcekey="ImgQRCode" runat="server" />
					<asp:Image ID="ImgDataMatrix" meta:resourcekey="ImgDataMatrix" runat="server" />
				</div>
			</div>
		</div>
	</asp:Panel>
	<div id="ModalContainer">
		<div id="DivUpdateStatus" class="ModalPopup">
			<BB:AddNote ID="AddNote" runat="server" />
		</div>
	</div>
	<script type="text/javascript">
		$("[id$='_LinkBikePicture']").colorbox();
		$("[id$='_LinkUpdateStatus']").colorbox({ width: "500px", inline: true, href: "#DivUpdateStatus" });
		$("[id$='_LinkTrackItem']").colorbox({ width: "640px", maxWidth: "95%", height: "520px", maxHeight: "95%", iframe: true });
	</script>
</asp:Content>